export function serverApiColumns() {
  return [
    {
      title: this.$t("module.serverApi.serverClassification"),
      key: "classification",
      sortable: "custom"
    },
    {
      title: this.$t("module.serverApi.serverProvider"),
      key: "provider",
      sortable: "custom"
    },
    {
      title: this.$t("module.serverApi.apiName"),
      key: "name",
      sortable: 'custom'
    },
    {
      title: this.$t("module.serverApi.apiAddress"),
      key: "address",
      sortable: 'custom'
    },
    {
      title: this.$t("common.status"),
      align: "left",
      key: "enabled",
      width: 120,
      render: (h, params) => {
        return h(
          "StatusButton",
          {
            props: {
              status: params.row.enabled == 1 ? "0" : "1"
            }
          },
          params.row.enabled ? this.$t("common.enable") : this.$t("common.disable")
        );
      }
    },
    {
      title: this.$t("common.operating"),
      align: "left",
      fixed: "right",
      width: 120,
      render: (h, params) => {
        return h("RowTools", {
          props: {
            data: this.getOperations(JSON.parse(JSON.stringify(params.row)))
          }
        });
      }
    }
  ];
}
